<?php

namespace app\shop\library\pay;

interface PayInterface
{
    /**
     * 支付
     * @param array $params
     * @return mixed
     */
    public function pay(array $params): mixed;

    /**
     * 退款
     * @param array $params
     * @return mixed
     */
    public function refund(array $params): mixed;

    /**
     * 查询
     * @param array $params
     * @return mixed
     */
    public function query(array $params): mixed;

    /**
     * 查询退款
     * @param array $params
     * @return mixed
     */
    public function queryRefund(array $params): mixed;

    /**
     * 获取支付对象
     * @return mixed
     */
    public function getPayObject(): mixed;

    /**
     * 设置支付配置项
     * @param array $config
     * @return mixed
     */
    public function setConfig(array $config): mixed;

    /**
     * 设置回调地址
     * @param string $notifyUrl
     * @param string $configGroup
     * @return mixed
     */
    public function setNotifyUrl(string $notifyUrl, string $configGroup = 'default'): mixed;

    /**
     * 设置支付后跳转地址
     * @param string $returnUrl
     * @param string $configGroup
     * @return mixed
     */
    public function setReturnUrl(string $returnUrl, string $configGroup = 'default'): mixed;
}